import { RuleParam } from "./types";

export const BuildParamList: RuleParam[] = [
    {
        param: "maxIssues",
        defaultValue: 0,
    },
    {
        param: "excludeCorrectable",
        defaultValue: false,
    },
    {
        param: "weights",
        defaultValue: {},
        demoValue: { complexity: 2, LongParameterList: 1, style: 1, comments: 1 },
        validValue: (value: unknown) => {
            if (typeof value !== "object") {
                return "值必须是有一个对象";
            }
            return null;
        }
    }
];

export const ConfigParamList: RuleParam[] = [
    {
        param: "validation",
        defaultValue: true,
    },
    {
        param: "warningsAsErrors",
        defaultValue: false,
    },
    {
        param: "checkExhaustiveness",
        defaultValue: false,
    },
    {
        param: "excludes",
        defaultValue: "",
        demoValue: "my_rule_set,.*>.*>[my_property]",
    }
];

export const ProcessorsParamList: RuleParam[] = [
    {
        param: "active",
        defaultValue: true,
    },
    {
        param: "exclude",
        defaultValue: [],
    },
];

export const ConsoleReportsParamList: RuleParam[] = [
    {
        param: "active",
        defaultValue: true,
    },
    {
        param: "exclude",
        defaultValue: ['ProjectStatisticsReport', 'ComplexityReport', 'NotificationReport', 'FindingsReport', 'FileBasedFindingsReport'],
        optionList: ['ProjectStatisticsReport', 'ComplexityReport', 'NotificationReport', 'FindingsReport', 'FileBasedFindingsReport', 'LiteFindingsReport'],
    },
];

export const OutputReportsParamList: RuleParam[] = [
    {
        param: "active",
        defaultValue: true,
    },
    {
        param: "exclude",
        defaultValue: [],
        optionList: ['TxtOutputReport', 'XmlOutputReport', 'HtmlOutputReport', 'MdOutputReport', 'SarifOutputReport'],
    }
];
